#include <iostream>
#include <cstdio>
using namespace std;

int main(int argc, char const *argv[]){
    int outpuf_buf[82][82];
    char a, b;
    int n;
    bool first_case = true;
    while(scanf("%d %c %c", &n, &a, &b) == 3){
        if (first_case == true)
            first_case = false;
        else
            printf("\n");
        for (int i = 1, j = 1; i <= n; i += 2, j++){ //j代表从内到外的第几圈，i代表该圈的边长
            int x = n/2 + 1, y = x;
            x -= j - 1;
            y -= j - 1;
            char c = j % 2 == 1 ? a : b;
            for (int k = 1; k <= i; k++){
                outpuf_buf[x+k-1][y] = c;
                outpuf_buf[x][y+k-1] = c;
                outpuf_buf[x+i-1][y+k-1] = c;
                outpuf_buf[x+k-1][y+i-1] = c;
            }
        }
        if (n != 1){
            outpuf_buf[1][1] = ' ';
            outpuf_buf[1][n] = ' ';
            outpuf_buf[n][1] = ' ';
            outpuf_buf[n][n] = ' ';
        }
        for (int i = 1; i <= n; i++){
            for (int j = 1; j <= n; j++)
                printf("%c", outpuf_buf[i][j]);
            printf("\n");
        }
    }
    return 0;
}